/*
*/

#include <prog.h>
#include <beam.h>
#include <display.h>
#include <event.h>
#include <form.h>
#include <timer.h>
#include <usb.h>

u32 Prog(u32 stt){
    u32		evn,t_m;
    KEY		key;

    FlashAll();
    t_m=Timer();
    while(stt==MOD_SIGNAL){
	evn=WaitEvent();
	switch(evn&EVN_MASK){
	case EVN_KEYPRESS:
	    keywave[GetKey(evn)]=key;
	    stt=MOD_LEARNING;
//	    IndicatorOn();
	    break;
	}
	if(TimeOut(t_m,TIM_OUT)){
	    stt=MOD_NIL;
	    IndicatorOff();
	}
    }
    return stt;
}
